package com.alibaba.aliper.agent.util;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.InputStreamReader;

public class FileReader {
	public static String readFromFile(String filename) {
		StringBuffer content = new StringBuffer();
		try {
			BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(filename)));
			String line = null;
			while((line = reader.readLine())!=null){
				content.append(line);
			}
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
		return content.toString();
	}
}
